package com.xin.libandroidpaysocial.share;

import android.os.Parcel;
import android.os.Parcelable;

import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;

/**
 * Created by pkxutao on 2017/11/22.
 */

public class ShareData implements Parcelable {



    private WXMediaMessage.IMediaObject mediaObject;/*微信分享的消息可为空 空时share_url必传 */
    private String share_url; /*跳转的url*/
    private String share_image; /*有可能是本地路径 图片地址 或资源id*/
    private String share_desc; /*描述*/
    private String share_title; /*标题*/
    private String app_name;

    @Override
    public String toString() {
        return "ShareData{" +
                "share_url='" + share_url + '\'' +
                ", share_image='" + share_image + '\'' +
                ", share_desc='" + share_desc + '\'' +
                ", share_title='" + share_title + '\'' +
                ", app_name='" + app_name + '\'' +
                '}';
    }

    public String getApp_name() {
        return app_name;
    }

    public void setApp_name(String app_name) {
        this.app_name = app_name;
    }

    public String getShare_title() {
        return share_title;
    }

    public void setShare_title(String share_title) {
        this.share_title = share_title;
    }


    public String getShare_url() {
        return share_url;
    }

    public WXMediaMessage.IMediaObject getMediaObject() {
        return mediaObject;
    }

    public void setMediaObject(WXMediaMessage.IMediaObject mediaObject) {
        this.mediaObject = mediaObject;
    }

    public void setShare_url(String share_url) {
        this.share_url = share_url;
    }

    public String getShare_image() {
        return share_image;
    }

    public void setShare_image(String share_image) {
        this.share_image = share_image;
    }

    public String getShare_desc() {
        return share_desc;
    }

    public void setShare_desc(String share_desc) {
        this.share_desc = share_desc;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.share_url);
        dest.writeString(this.share_image);
        dest.writeString(this.share_desc);
        dest.writeString(this.share_title);
        dest.writeString(this.app_name);
    }

    public ShareData() {
    }

    protected ShareData(Parcel in) {
        this.share_url = in.readString();
        this.share_image = in.readString();
        this.share_desc = in.readString();
        this.share_title = in.readString();
        this.app_name = in.readString();
    }

    public static final Parcelable.Creator<ShareData> CREATOR = new Parcelable.Creator<ShareData>() {
        @Override
        public ShareData createFromParcel(Parcel source) {
            return new ShareData(source);
        }

        @Override
        public ShareData[] newArray(int size) {
            return new ShareData[size];
        }
    };
}
